"""
Task 3

Words combination

Create a program that reads an input string and then creates and prints 5 random strings from characters of the input string.

For example, the program obtained the word `hello`, so it should print 5 random strings(words) that combine characters 

'h', 'e', 'l', 'l', 'o' -> 'hlelo', 'olelh', 'loleh' …

Tips: Use random module to get random char from string)
"""
from random import randint

def random_string(entered_string):
    new_string = ""
    while len(entered_string) > 0:
        random_index = randint(0, len(entered_string)-1)
        new_string += entered_string[random_index]
        entered_string = entered_string[:random_index] + entered_string[random_index+1:]
    return(new_string)

n = 0
entered_string = input("Enter your string: ")
while n < 5:
    print(random_string(entered_string))
    n += 1


# Improvement comment - use random.shuffle() method